package com.dyrj.base.system.log.controller;
import com.dyrj.base.system.log.model.SysLog;
import com.dyrj.base.system.log.service.SysLogService;
import com.dyrj.common.BaseController;
import com.dyrj.vo.PageResultMsg;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Controller
@RequestMapping("/system/log")
public class SysLogController extends BaseController {
    @Resource
    private SysLogService sysLogService;
    /**
     * @Title: index
     * @Description: TODO(主页)
     * @return String    返回类型
     */
    @GetMapping("/index")
    @RequiresPermissions("system:log:index")
    public String index() {
        return "system/log/log";
    }
    @GetMapping("/table")
    @ResponseBody
    @RequiresPermissions("system:log:index")
    public PageResultMsg table(SysLog record) {
//        ModelMap map = new ModelMap();
//        map.addAttribute("pidname",record.getName());
//        map.addAttribute("pid",record.getId());
        return sysLogService.table(record);
    }
}
